﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    CodeFile="TerminalSessions.aspx.cs" Inherits="TerminalSessions" Title="Terminal sessions" %>

<asp:Content ID="Content2" ContentPlaceHolderID="content" runat="Server">
    <asp:ListView ID="lvSessions" runat="server" DataSourceID="dsSessions">
        <LayoutTemplate>
            <table cellpadding="4" cellspacing="0" style="width: 100%">
                <thead>
                    <tr>
                        <th>
                            Id
                        </th>
                        <th>
                            Session
                        </th>
                        <th>
                            State
                        </th>
                        <th>
                            User name
                        </th>
                        <th>
                            Client address
                        </th>
                    </tr>
                </thead>
                <tbody>
                    <tr id="itemPlaceholder" runat="server" />
                </tbody>
            </table>
        </LayoutTemplate>
        
        <ItemTemplate>
            <tr>
                <td class="item">
                    <%#Eval("Id")%>
                </td>
                <td class="item">
                    <%#Eval("WinStationName")%>
                </td>
                <td class="item">
                    <%#Eval("State")%>
                </td>
                <td class="item">
                    <%#Eval("UserDomainName")%>
                </td>
                <td class="item">
                    <%#Eval("Address")%>
                </td>
            </tr>
        </ItemTemplate>
        
        <AlternatingItemTemplate>
            <tr>
                <td class="item2">
                    <%#Eval("Id")%>
                </td>
                <td class="item2">
                    <%#Eval("WinStationName")%>
                </td>
                <td class="item2">
                    <%#Eval("State")%>
                </td>
                <td class="item2">
                    <%#Eval("UserDomainName")%>
                </td>
                <td class="item2">
                    <%#Eval("Address")%>
                </td>
            </tr>
        </AlternatingItemTemplate>
    </asp:ListView>  
    <asp:ObjectDataSource ID="dsSessions" runat="server" SelectMethod="GetSessions" TypeName="TerminalSessionsWrapper"
        OldValuesParameterFormatString="original_{0}"></asp:ObjectDataSource>
</asp:Content>

<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="head">
<style type="text/css">        
        td.item
        {
            background-color: #EFF3FB;
        }
        td.item2
        {
            background-color: White;
            color: #284775;
        }
        thead > tr
        {
            background-color: #5D7B9D;
            font-weight: bold;
            color: White;
        }
    </style>
</asp:Content>